import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    name: 'FirstPage',
    component: () => import('../components/FirstPage.vue')
  },
  {
    path: '/layout',
    name: 'Layout',
    component: () => import ('../views/Layout/index.vue'),
    children: [
      {
        path: "",
        name:"Home",
        component: () => import('../views/Home/index.vue')
      },
      {
        path:"home",
        redirect: "/layout"
      },
    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
